package com.alamiya.security.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * DTO for storing a user's credentials.
 *
 * @author hehaoqi
 */
@Data
public class LoginDto {

    @Size(min = 1, max = 50)
    @NotEmpty(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名", required = true, example = "test")
    private String username;

    @Size(min = 4, max = 100)
    @NotEmpty(message = "密码不能为空")
    @ApiModelProperty(value = "密码", required = true, example = "test")
    private String password;

    @ApiModelProperty(value = "记住我", example = "false")
    private Boolean rememberMe;

}
